<form id="project-permissions-apply-template-form" autocomplete="off">
  <div class="modal-head">
    <h2>Apply Permission Template to "{{project.name}}"</h2>
  </div>

  <div class="modal-body">
    <div class="js-modal-messages"></div>

    {{#if done}}
      <div class="alert alert-success">
        {{t 'projects_role.apply_template.success'}}
      </div>
    {{/if}}

    {{#unless done}}
      {{#notNull permissionTemplates}}
        <div class="modal-field">
          <label for="project-permissions-template">
            Template<em class="mandatory">*</em>
          </label>
          <select id="project-permissions-template">
            {{#each permissionTemplates}}
              <option value="{{id}}">{{name}}</option>
            {{/each}}
          </select>
        </div>
      {{else}}
        <i class="spinner"></i>
      {{/notNull}}
    {{/unless}}
  </div>

  <div class="modal-foot">
    {{#unless done}}
      {{#notNull permissionTemplates}}
        <button id="project-permissions-apply-template">Apply</button>
      {{/notNull}}
    {{/unless}}
    <a href="#" class="js-modal-close">Close</a>
  </div>
</form>
